Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[entropy_src/dv] Separate external health test (XHT) verification from V2 tests #17638

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

andreaskurth
Copy link
Contributor

As described in #17358, the current instantiation of entropy_src in the Earlgrey top-level design has the XHT response input tied off to a default value, but the entropy_src_rng block-level test had time-varying, non-default XHT responses.

This PR changes that in three commits as follows:

  1. Add a config knob that tells tests to only drive the default XHT response.
  2. Add a scoreboard check to ensure that the knob is respected.
  3. Separate entropy_src_rng with time-varying XHT responses to a new entropy_src_rng_with_xht_rsps test and change entropy_src_rng to only drive default XHT responses.

This resolves #17358.

@andreaskurth andreaskurth added Component:DV DV issue: testbench, test case, etc. IP:entropy_src labels Mar 21, 2023
@andreaskurth andreaskurth added this to the Discrete: M2.5 milestone Mar 21, 2023
@andreaskurth andreaskurth requested a review from a team as a code owner March 21, 2023 21:06
@andreaskurth andreaskurth self-assigned this Mar 21, 2023
Copy link
Contributor

@vogelpi vogelpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic, thanks @andreaskurth for having a look at this!

@@ -1107,6 +1108,21 @@ class entropy_src_scoreboard extends cip_base_scoreboard#(
end
endtask

task process_xht();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to add such a check!

Nit: should this task rather be named check_xht_response()?

Copy link
Contributor Author

@andreaskurth andreaskurth Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, at some point the scoreboard will have to take XHT transactions into account for its modeling and checking, as it already does for TL accesses, for example. By convention, these tasks seem to start with process_, e.g., process_tl_access is defined for our scoreboards derived from cip_base_scoreboard. So I think process_xht is appropriate.

Note that in a proper UVM design, the scoreboard would not sample I/Os directly but use TLM analysis FIFOs (again using the TL example, the scoreboard calls process_tl_fifo -> process_tl_a_item -> process_tl_access). I decided against this design for now for two main reasons:

  • It's overly complicated for the check we need right now.
  • As we want to ensure the DUT sees a fixed value in every cycle, directly sampling I/O is less error-prone than the indirection through a monitor and analysis FIFOs.

When implementing XHT tests, the checks in this PR can be complemented by or moved to TLM-based checks.

Copy link
Contributor

@cindychip cindychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -73,6 +73,13 @@
uvm_test_seq: entropy_src_rng_vseq
}

{
name: entropy_src_rng_with_xht_rsps
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: This test has the default number of reseeds (50), whereas entropy_src_rng still has 300. The number of reseeds can be increased later depending on XHT coverage (#16276)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@andreaskurth
Copy link
Contributor Author

I've tested this PR locally with 300 seeds of entropy_src_rng (97% pass rate) and 50 seeds of entropy_src_rng_with_xht_rsps (96% pass rate), which matches the latest nightly results

When this knob is enabled, the default XHT response is always provided
to `entropy_src`.

Signed-off-by: Andreas Kurth <[email protected]>
This commit extends `entropy_src_scoreboard` to check that the default
XHT response is indeed always applied if the corresponding knob is set.

Signed-off-by: Andreas Kurth <[email protected]>
This commit changes the default value of the knob that tells tests to
always provide the default XHT response to 1 (true).  The rationale is
that this is the same behavior as in the current top-level design, so we
want to make sure that all existing tests work in an environment in
which `entropy_src` is always given the default XHT response.  The only
test affected by this is `entropy_src_rng`.

In order to not completely remove any test that provides time-varying
XHT responses, this commit creates a new test,
`entropy_src_rng_with_xht_rsps`, in which the `xht_only_default_rsp`
knob is set to zero.  This test is equivalent to the `entropy_src_rng`
test before this commit.

Signed-off-by: Andreas Kurth <[email protected]>
@andreaskurth andreaskurth force-pushed the entropy_src-separate-xht-testing branch from 6f57caa to ec3e4b2 Compare March 23, 2023 11:02
@andreaskurth
Copy link
Contributor Author

andreaskurth commented Mar 23, 2023

Rebased to include CI fixes

Copy link
Contributor

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this issue. I've retriggered failed jobs on CI, let's wait for those to finish before merging.

@vogelpi vogelpi merged commit cf597d5 into lowRISC:master Mar 24, 2023
@andreaskurth andreaskurth deleted the entropy_src-separate-xht-testing branch March 24, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. IP:entropy_src
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[entropy_src, dv] Disconnect extht agent in block-level DV for M2.5
4 participants